package com.zoe.app.config;

import com.zoe.app.dynamic.DynamicDataSourceProvider;
import com.zoe.app.dynamic.DynamicDataSourceRouter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author zoe.Zhang
 * @date 2023/02/24
 * @description
 */
@Configuration
public class DynamicDataSourceConfig {

    @Bean
    DynamicDataSourceRouter dynamicDataSourceRouter(DynamicDataSourceProvider dynamicDataSourceProvider) {
        return new DynamicDataSourceRouter(dynamicDataSourceProvider);
    }
}
